package com.bjsxt.mapper;

import com.bjsxt.pojo.Admin;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import sun.text.UCompactIntArray;

import java.util.List;

public interface AdminMapper {
    //登陆验证
    @Select("select * from t_admin where aname=#{param1} and apwd=#{param2}")
    Admin selectOne(String aname, String apwd);


    //查询所有个管理员
    @Select("select * from t_admin")
    List<Admin>   selectAll();

    //添加管理员

    Integer insertAdmin(Admin admin);
    @Insert("insert  into t_admin_role values(#{param1},#{param2},default)")
    Integer insertRole(Integer aid, Integer rid);
}
